Pass action parameter to participants route when changing recipient#84321
Conversation
When tapping the To field on the confirmation page during a Submit it to someone flow for track distance expenses, the action parameter was not being forwarded to the participants route. This caused it to default to create, which incorrectly included self DM in the participant list. Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
@MelvinBot mark as ready for review |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #81003 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
🚧 @mjasikowski has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.3.33-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.33-5 🚀
|
Explanation of Change
In
MoneyRequestConfirmationList.tsx, thenavigateToParticipantPagefunction was not passing theactionparameter when navigating to the participants step. This caused the route to defaultactionto'create'instead of preserving the actual action (e.g.,'submit'). As a result, when the user tapped the "To" field on the confirmation page during a "Submit it to someone" flow for a track distance expense,isMovingTransactionFromTrackExpense('create')returnedfalse, which setincludeSelfDMtotrue— incorrectly showing the self DM option in the participant list.The fix passes the existing
actionprop as the 5th argument toROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(), so the participants step preserves the correct flow context.Fixed Issues
$ #81003
PROPOSAL: #81003 (comment)
Tests
Offline tests
N/A — This change only affects navigation route parameters. No network calls are involved in the fix.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — No UI changes, only route parameter fix
Android: mWeb Chrome
N/A — No UI changes, only route parameter fix
iOS: Native
N/A — No UI changes, only route parameter fix
iOS: mWeb Safari
N/A — No UI changes, only route parameter fix
MacOS: Chrome / Safari
Tested on web — after the fix, tapping the "To" field on the confirmation page during a "Submit it to someone" flow for a track distance expense correctly excludes self DM from the participant list.